Skip to content

Conversation

@douden
Copy link
Contributor

@douden douden commented Jan 26, 2026

This pull request introduces several new configuration options and improvements to the Sphinx-Proof extension, focusing on enhanced customization for directive titles, support for shared numbering between directive types, and the addition of a new "notation" directive. It also improves documentation and CSS styling for consistency and flexibility.

New Features and Configuration Options:

  • Added support for customizing the proof directive title format with the new proof_title_format option, as well as proof_number_weight and proof_title_weight for CSS font-weight customization. These options can be set in both Sphinx and Jupyter Book projects. (Fd2c6942L27R144, [1] [2] [3] [4]
  • Introduced the prf_realtyp_to_countertyp option to allow shared numbering across groups of directives, enabling more flexible counter management. (Fd2c6942L27R144, [1] [2] [3] [4]

Documentation Updates:

  • Updated documentation to include the new "notation" directive, with usage examples and cross-referencing instructions. [1] [2] [3]
  • Expanded documentation for the new configuration options, including detailed usage for both Sphinx and Jupyter Book. (Fd2c6942L27R144, README.mdL13-R24)
  • Added changelog entries for all new features and fixes.

Styling and CSS Improvements:

  • Added CSS variables and rules for the new "notation" directive, and fixed inconsistencies in color naming (e.g., corrected --obseration-border-color to --observation-border-color). [1] [2] [3]
  • Ensured that font weights for directive titles and numbers are set according to user configuration in the generated CSS. [1] [2] [3]

Internal Improvements:

  • Added validation and warnings for new configuration options to prevent misconfiguration and improve user experience.
  • Fixed an issue with nesting of unnumbered directives using caused by an incorrect search methodology.

These changes provide users with greater flexibility in formatting and organizing mathematical directives, improved documentation, and more consistent styling across directive types.

This PR:

douden and others added 10 commits January 23, 2026 13:35
* Add options for proof directive title formatting

Introduces new configuration options: proof_title_format, proof_number_weight, and proof_title_weight, allowing users to customize the format and font weight of proof directive titles. Documentation and CSS updated to reflect these changes, and directive logic now applies the user-defined title format.
* feat: Added possibility for shared numbering of theorems, fixing issue #64 (#161)

Added optioin to have directives share numbering. Reflected also in docs.

* Add config validation

Introduces a check_config_values function to validate Sphinx configuration values at runtime, ensuring correct types and defaults for proof-related settings. 

---------

Co-authored-by: Leonid Ryvkin <ryvkin@gmx.com>
Introduced CSS variables and styles for 'notation' admonitions in both minimal and main proof.css. Standardized and expanded the use of CSS custom properties for all proof-related admonition types, improving maintainability and visual consistency.
Introduces a new section describing the `prf:notation` directive, its options, usage examples, and referencing notations in the documentation.
Included the [notation](syntax:notation) directive in the list of supported directives on the documentation index page.
Added details about shared numbering for directive groups, fixed CSS inconsistencies, and documented the notation directive in CHANGELOG.md. Updated README.md to include the notation directive, mention shared numbering, and clarify styling options.
Appended a newline character to the end of sphinx_proof/_static/proof.css to follow POSIX file standards and improve compatibility with some tools.
Improves handling of nested unenumerable nodes by correctly identifying the appropriate occurrence of '<p class="admonition-title">' in the body. Updates the list_rindex function to support skipping occurrences, addressing issue #165.
Adds IDs to title nodes when the 'nonumber' option is set, enabling more reliable identification of titles in HTML output. Refactors the depart_unenumerable_node function to use these IDs for inserting captions, simplifying the logic and improving robustness.
Updated the algorithm admonition title to include a 'caption-number' span and set the id attribute for improved structure and accessibility.
@douden douden marked this pull request as ready for review January 26, 2026 20:04
@douden douden merged commit 2d34f26 into main Jan 27, 2026
7 checks passed
@douden douden deleted the prepare-release branch January 27, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header of admonition shows up at nested admonition Update Color Schemes Shared numbering between directives

3 participants